home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
baswin.arc
/
SCROLL.SUB
< prev
next >
Wrap
Text File
|
1986-11-10
|
2KB
|
52 lines
SUB SCROLL(ULR%,ULC%,LRR%,LRC%,LINES%,DIR%,NEWMSG$) STATIC
'Adjust for 0 reference of parameters for BIOS call
ULR%=ULR%-1
ULC%=ULC%-1
LRR%=LRR%-1
LRC%=LRC%-1
DIM INARRY%(7),OUTARRY%(7)
'Prepare INARRY% variables with data for SCROLL BIOS CALL
'Determine if SCROLL UP (6) or SCROLL DOWN (7) Service
IF DIR%=1 THEN INARRY%(0)=1536 ELSE IF DIR%= -1 THEN INARRY%(0)=1792 ELSE EXIT SUB
'Service 6 = 6 shifted 8 = 1536, Service 7 = 7 shifted 4 = 1792
'Service goes in AH register
INARRY%(0)=INARRY%(0)+LINES%
'Lines goes in AL register
INARRY%(1)=SCREEN(ULR%,ULC%,1)*256
'BH = Color Attribute of window
INARRY%(2)=(ULR%*256)+ULC%
'CH=ULR, CL=ULC
INARRY%(3)=(LRR%*256)+LRC%
'DH=LRR, DL=LRC
INARRY%(4)=0:INARRY%(5)=0:INARRY%(6)=0:INARRY%(7)=0
'All other registers empty
'Perform Scroll
INTRRPT%=16:'Video BIOS Interrupt
CALL INT86(INTRRPT%,VARPTR(INARRY%(0)),VARPTR(OUTARRY%(0)))
'Determine if NEWMSG$ goes on top or bottom line
IF DIR%=1 THEN ROW%=LRR%+1 ELSE IF DIR%=-1 THEN ROW%=ULR%+1
COL%=ULC%+1
ATTR%=SCREEN(ULR%,ULC%,1)
CALL FASTPRT(NEWMSG$,ROW%,COL%,ATTR%)
END SUB